<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Error
 *
 * @author chaporgin_a
 */
class VA_Form_Decorator_Error extends VA_Form_Decorator {
    public function  __construct($options) {}
    public function render($content){
      $result = '';
      $messages = $this->getElement()->getErrorMessages();
      if(!empty ($messages)){
        $result .= '<ul class="errorMessagesWrapper">';
        foreach($messages as $m)
          $result .= "<li class='error'>$m</li>";
        $result .= '</ul>';
      }
      return $content.$result;
    }
}
?>
